<div id="product-list">
  <h1>Resource Listing</h1>

  <table cellpadding="5" cellspacing="0">
  <% for resource in @resources %>
    <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>">
      <td width="60%">
        <span class="list-title"><%= h(resource.title) %></span><br />
        <%= resource.file_relative_path %><br />
        <%= resource.created_at.to_s %><br />
        <%= image_tag thumbnail(resource.thumbnail)%>
      </td>

      <td class="list-actions">
        <%= link_to 'Show', :action => 'show', :id => resource %><br/>
        <%= link_to 'Edit', :action => 'edit', :id => resource %><br/>
        <%= link_to 'Destroy', { :action  => 'destroy', :id => resource },
                                 :confirm => "Are you sure?",
                                 :method  => :post %>
      </td>
    </tr>
  <% end %>
  </table>
</div>

<%=  if @resource_pages.current.previous 
       link_to("Previous resource", { :resource => @resource_pages.current.previous })
     end
%>

<%= if @resource_pages.current.next 
      link_to("Next resource", { :resource => @resource_pages.current.next })
    end
%>

<br />

<%= link_to 'New Resource', :action => 'new' %>
